package com.quad.innovators.salesease.model.form;


import com.quad.innovators.salesease.enums.MenuTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

@Schema(description = "菜单表单对象")
@Data
public class SysMenuForm {

    @Schema(description = "菜单code")
    private String code;

    @Schema(description = "父菜单编码")
    private String parentCode;

    @Schema(description = "菜单名称")
    private String name;

    @Schema(description = "菜单类型（1-菜单 2-目录 3-外链 4-按钮）")
    private MenuTypeEnum type;

    @Schema(description = "路由名称")
    private String routeName;

    @Schema(description = "路由路径")
    private String routePath;

    @Schema(description = "组件路径(vue页面完整路径，省略.vue后缀)")
    private String component;

    @Schema(description = "权限标识")
    private String perm;

    @Schema(description = "显示状态(1:显示;0:隐藏)")
    @Range(max = 1, min = 0, message = "显示状态不正确")
    private Integer visible;

    @Schema(description = "排序(数字越小排名越靠前)")
    private Integer orderNo;

    @Schema(description = "菜单图标")
    private String icon;

    @Schema(description = "跳转路径")
    private String redirect;

    @Schema(description = "【菜单】是否不开启页面缓存， 0-否，1-是", example = "1")
    private Integer ignoreKeepAlive;

    @Schema(description = "【目录】是否隐藏子目录，0-否，1-是", example = "1")
    private Integer hideChildrenInMenu;

    @Schema(description = "是否隐藏目录，0-否，1-是", example = "1")
    private Integer hideMenu;

    @Schema(description = "是否添加到标签视图，0-否，1-是", example = "1")
    private Integer affix;

    @Schema(description = "iframe地址", example = "1")
    private String iframeSrc;

    @Schema(description = "外链地址", example = "1")
    private String externalSrc;

    @Schema(description = "路由参数")
    private String params;

}
